﻿namespace ExamV5
{
    using System;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;

    public class FrmMain : Page
    {
        protected HtmlForm form1;

        protected void Page_Load(object sender, EventArgs e)
        {
            string str = "";
            PublicFun fun = new PublicFun();
            HttpCookie cookie = null;
            cookie = new HttpCookie("ExamUserLevel");
            cookie = base.Request.Cookies["ExamUserLevel"];
            cookie.Value = fun.CheckString(base.Server.UrlDecode(cookie.Value));
            if (cookie.Value != "A")
            {
                str = "FrmManagExamList.aspx";
            }
            else
            {
                string str3 = fun.GetValues("select ParmValue from SysParmInfo where ParmMemo='HomeSet'", "ParmValue").Trim();
                if (str3.Trim() == "")
                {
                    str3 = "E";
                }
                switch (str3)
                {
                    case "E":
                        str = "FrmUserExamList.aspx";
                        goto Label_0115;

                    case "S":
                        str = "LineStudyExam/TaskInfo.aspx";
                        goto Label_0115;

                    case "B":
                        str = "StudyInfo/FrmShowStudy.htm";
                        goto Label_0115;

                    case "L":
                        str = "StudyInfo/FrmShowLession.htm";
                        goto Label_0115;

                    case "P":
                        str = "StudyInfo/FrmStudyList.aspx";
                        goto Label_0115;
                }
                str = "FrmUserExamList.aspx";
            }
        Label_0115:
            base.ClientScript.RegisterClientScriptBlock(this.Page.ClientScript.GetType(), "LoingAScript", "OpenMainFrm('" + str + "')", true);
        }
    }
}

